$OpenBSD: patch-src_libjasper_jpc_jpc_t1enc_c,v 1.1 2008/05/17 09:32:16 espie Exp $
--- src/libjasper/jpc/jpc_t1enc.c.orig	Fri May 16 21:00:25 2008
+++ src/libjasper/jpc/jpc_t1enc.c	Fri May 16 21:11:52 2008
@@ -219,7 +219,7 @@ int jpc_enc_enccblk(jpc_enc_t *enc, jas_stream_t *out,
 
 	cblk->numpasses = (cblk->numbps > 0) ? (3 * cblk->numbps - 2) : 0;
 	if (cblk->numpasses > 0) {
-		cblk->passes = jas_malloc(cblk->numpasses * sizeof(jpc_enc_pass_t));
+		cblk->passes = jas_alloc2(cblk->numpasses, sizeof(jpc_enc_pass_t));
 		assert(cblk->passes);
 	} else {
 		cblk->passes = 0;
